#include "Thread.h"
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <iostream>

using std::bind;
using std::cout;
using std::endl;

void getRand()
{
    while(true)
    {
        ::srand(time(NULL));
        cout << rand() << endl;
        ::sleep(1);
    }
}

struct Test
{
    void test()
    {
        cout << "pthread test succ" << endl;
    }
};

int main(int argc, char* argv[])
{
    Thread thread(std::bind(&Test::test, Test()));

    thread.start();
    thread.join();
    return 0;
}
